CSE 311: Homework 4 Part 2

Due: Monday, May 11th by 6:00 PM

Instructions

Write up carefully argued solutions to the following problems. Each solution should be clear enough that it can explain (to someone who does not already understand the answer) why it works. However, you may use results from lecture, the reference sheets, and previous homework without proof.

You are required to submit your own solutions. You are allowed to discuss the homework with other students. However, the write up must clearly be your own, and moreover, you must be able to explain your solution at any time. We reserve ourselves the right to ask you to explain your work at any time in the course of this class.

You have a total of three late days during the quarter, but you can only use one late day on any one homework, giving an additional day on both parts. Please plan ahead.

Submit your solution via Gradescope. In particular:

  • Each numbered task should be solved on its own page (or pages). Do not write your name on the individual pages. (Gradescope will handle that.)

  • When you upload your pages, make sure each one is properly rotated. If not, you can use the Gradescope controls to turn them to the proper orientation.

  • Follow the Gradescope prompt to link tasks to pages.

  • You are not required to typeset your solution, but your submission must be legible. It is your responsibility to make sure solutions are readable — we will not grade unreadable write-ups.

Task 1 – Keeping Up With the Cartesians

Let AA, BB, and CC be sets. Consider the following claim: B×AC×BB \times A \subseteq C \times B

  1. Suppose that A={1}A = \{1\}, B={1,2}B = \{1, 2\}, and C={1,2,3}C = \{1,2,3\}.

    Calculate the values of the sets B×AB \times A and C×BC \times B. Check whether the claim holds.

  2. Suppose that A={1,2}A = \{1, 2\}, B={1}B = \{1\}, and C={1,2,3}C = \{1, 2, 3\}.

    Calculate the values of the sets B×AB \times A and C×BC \times B. Check whether the claim holds.

  3. Write an English proof that the claim holds given that ABA \subseteq B and BCB \subseteq C.

    (This updated claim describes the situation in part (a) but not part (b).)

    Follow the structure of our template for subset proofs.

    Note: even though we want you to write your proof directly in English, it must still look like the translation of a formal proof. In particular, you must include all steps that would be required of a formal proof, excepting only those that we have explicitly said are okay to skip in English proofs.

Task 2 – Our Finest Power

Let AA, BB, and CC be sets. Consider the following claim: 𝒫(A(BC))𝒫(AB)𝒫(AC)\mathcal{P}(A \cap (B \cup C)) \subseteq \mathcal{P}(A \cap B) \cup \mathcal{P}(A \cap C)

  1. Suppose that A={1,2}A = \{1, 2\}, B={1,3}B = \{1, 3\}, and C={2,4}C = \{2, 4\}.

    Calculate the values of the sets 𝒫(A(BC))\mathcal{P}(A \cap (B \cup C)) and 𝒫(AB)𝒫(AC))\mathcal{P}(A \cap B) \cup \mathcal{P}(A \cap C)). Check whether the claim holds.

  2. Suppose that A={1}A = \{1\}, B={1,2}B = \{1, 2\}, and C={1,3}C = \{1, 3\}.

    Calculate the values of the sets 𝒫(A(BC))\mathcal{P}(A \cap (B \cup C)) and 𝒫(AB)𝒫(AC))\mathcal{P}(A \cap B) \cup \mathcal{P}(A \cap C)). Check whether the claim holds.

  3. Write an English proof that the claim holds given (AB)(AC)(A \cap B) \subseteq (A \cap C) holds.

    (This updated claim describes the situation in part (b) but not part (a). The claim holds when either (AB)(AC)(A \cap B) \subseteq (A \cap C) or (AC)(AB)(A \cap C) \subseteq (A \cap B) hold, but the proof is the same for both cases thus one was omitted. Think about why that would intuitively make sense!)

    Follow the structure of our template for subset proofs.

    In your proof, you are free to use (cite or apply) the following theorems about sets:

    Transitivity of Subset:ABC(((AB)(BC))(AC))\text{Transitivity of Subset:}\ \ \ \forall A\, \forall B\, \forall C\, (((A \subseteq B) \wedge (B \subseteq C)) \to (A \subseteq C))

    Distributivity of Set:ABC(A(BC)=(AB)(AC))\text{Distributivity of Set:}\ \ \ \forall A\, \forall B\, \forall C\, (A \cap (B \cup C) = (A \cap B) \cup (A \cap C))

    Note: even though we want you to write your proof directly in English, it must still look like the translation of a formal proof. In particular, you must include all steps that would be required of a formal proof, excepting only those that we have explicitly said are okay to skip in English proofs.

Task 3 – Parmesan, Romano, and Meta

Let AA, BB, and CC be sets. For each of the following claims:

  1. State whether the the claim is true or false.

  2. If the claim is true, write an English proof that the claim holds following the Meta Theorem template. (In your equivalence chain, you can skip steps showing commutativity or associativity, as long as each step is easy to follow.)

  3. If it the claim false, give a counterexample. Provide specific finite sets for AA, BB, and CC, and then calculate the value of each side of the claim, showing that they do not produce the same set. (Be sure to show the value of each intermediate expression, when calculating each side.)

  1. (AB)(AB¯)=A(A \cap B) \cup (A \cap \overline{B}) = A

  2. (AB)\C=(AC)\B(A \cup B) \,\setminus\, C = (A \cup C) \,\setminus\, B

  3. A\(BC)=(A\B)(A\C)A \,\setminus\, (B \cap C) = (A \,\setminus\, B) \cup (A \,\setminus\, C)

Task 4 – Optional Practice Problems (Extra Credit)

The following problems are optional and do not need to be submitted. However, you may submit solutions and receive a small amount of extra credit for any 5 (of the 12) subparts, graded solely on completion. For the maximum extra credit score, at least 5 subparts should be submitted, including at least one subpart from each of the three sections.

  1. Prove each of the following claims.

    1. Let AA and BB be sets. If 𝒫(A)𝒫(B)\mathcal{P}(A) \subseteq \mathcal{P}(B), then ABA \subseteq B.

    2. Let AA and BB be sets. 𝒫(AB)𝒫(A)𝒫(B)\mathcal{P}(A\cup B)\supseteq\mathcal{P}(A)\cup\mathcal{P}(B).

    3. Let AA and BB be sets. If ABA\subseteq B, then A×BB×BA\times B\subseteq B\times B.

    4. Let AA and BB be sets. If AA \neq \emptyset and BB \neq \emptyset and ABA \neq B, then A×BB×AA\times B \neq B\times A.

    5. For any set AA and any nn \in \mathbb{N}, if AA has nn elements, then 𝒫(A)\mathcal{P}(A) has 2n2^n elements.

      Hint: Use induction. You can use without justification the following fact: If AA is nonempty with nn elements and xx is an element of AA, then A\{x}A \,\setminus\, \{x\} has n1n-1 elements.

  2. Let AA, BB, and CC be sets. For each of the following claims, either provide an English proof that the claim holds, or give a counterexample showing that the claim does not hold.

    1. A\(BC)=(A\B)(A\C)A\setminus(B\cap C) = (A\setminus B)\cap(A\setminus C).

    2. AB=A\(A\B)A\cap B = A\,\setminus\,(A\,\setminus\, B).

    3. ((AA¯)B¯)C¯=BC¯((A\cap \overline{A})\cup \overline{B}) \cup \overline{C} = \overline{B\cap C}.

  3. Use structural induction for the following problems. Let double be a function on lists and leaves be a function on trees, defined as follows: double(𝗇𝗂𝗅):=𝗇𝗂𝗅,double(a::L):=a::a::double(L)leaves():=1,leaves(𝖳𝗋𝖾𝖾(L,R)):=leaves(L)+leaves(R)\begin{aligned} \text{double}(\mathop{\mathrm{\textsf{nil}}}) := \mathop{\mathrm{\textsf{nil}}}, &\quad \text{double}(a :: L) := a :: a :: \text{double}(L) \\ \text{leaves}(\bullet) := 1, &\quad \text{leaves}(\mathop{\mathrm{\textsf{Tree}}}(L,R)) := \text{leaves}(L) + \text{leaves}(R) \end{aligned}

    1. Prove L𝐋𝐢𝐬𝐭(𝗅𝖾𝗇(double(L))=2𝗅𝖾𝗇(L))\forall L \in \textbf{List}\,(\mathop{\mathrm{\textsf{len}}}(\text{double}(L)) = 2 \cdot \mathop{\mathrm{\textsf{len}}}(L)).

    2. Prove L𝐋𝐢𝐬𝐭(𝗉𝗈𝗌𝗂𝗍𝗂𝗏𝖾𝗌(double(L))=2𝗉𝗈𝗌𝗂𝗍𝗂𝗏𝖾𝗌(L))\forall L \in \textbf{List}\,(\mathop{\mathrm{\textsf{positives}}}(\text{double}(L)) = 2 \cdot \mathop{\mathrm{\textsf{positives}}}(L)).

    3. Prove T𝐓𝐫𝐞𝐞(leaves(T)𝗁𝖾𝗂𝗀𝗁𝗍(T)+1)\forall T \in \textbf{Tree}\,(\text{leaves}(T) \geq \mathop{\mathrm{\textsf{height}}}(T) + 1).

    4. Prove T𝐓𝐫𝐞𝐞(leaves(T)2𝗁𝖾𝗂𝗀𝗁𝗍(T))\forall T \in \textbf{Tree}\,(\text{leaves}(T) \leq 2^{\mathop{\mathrm{\textsf{height}}}(T)}).